home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / bbs / tg_os2.zip / STARTDOS.ZIP / README < prev    next >
Text File  |  1995-06-26  |  12KB  |  316 lines

  1. StartDos                        Monte Copeland, IBM Boca Raton
  2.  
  3. (c) Copyright International Business Machines Corporation 1993-1995.
  4. All rights reserved.
  5.  
  6. REVISION HISTORY
  7.  
  8. 26JUN95: PMSD.EXE for WinStartApp() on Warp.
  9. 10MAY94: mods to StartSeamless(); WinStartApp for common vdm
  10. 15FEB94: new api's SetWindowPos() and QueryDesktop()
  11. 20JAN94: IBM Employee Written Software release
  12. 05JAN94: tweak readme
  13. 11NOV93: new api StartSeamless(); tweak readme
  14. 25OCT93: settings.exe; sprintf pid into term queue name
  15. 11OCT93: fix REXX file search bug; tweak readme
  16. 09OCT93: tweak readme; new REXX API SetSessionTitle()
  17. 21SEP93: new REXX API SetCommandArgs()
  18. 27AUG93: default session full screen; searches PATH environment
  19. for CMD file; startdata length changed to 32.
  20. 06MAY93: first release on OS2TOOLS.
  21.  
  22.  
  23. --------------------------- STARTDOS USAGE -------------------------------
  24.  
  25. STARTDOS <REXX CMD file> <optional command.com arguments>
  26. PMSD     <REXX CMD file> <optional command.com arguments>
  27.  
  28. Example STARTDOS/PMSD command lines:
  29.  
  30. startdos                        prints this readme
  31. startdos sets.cmd               searches path for sets.cmd
  32. startdos sets                   adds .CMD then searches path
  33. startdos sets /c wp             /c for call; session exits with wp
  34. startdos sets /k dir            /k for keep; dir and session stays
  35.                                 /c and /k are command.com-defined switches
  36. startdos sets /c winos2 word    starts winos2 and a windows program
  37.  
  38.  
  39. -------------------------------- INTRODUCTION ----------------------------
  40.  
  41. StartDos is an OS/2 program to start virtual DOS mode sessions under OS/2.
  42. The nature of DOS sessions under OS/2 is controlled by DOS settings, some of
  43. which can only be set at session startup. StartDos accepts these settings via
  44. a REXX command file then starts a DOS session. Examples of some setting
  45. strings that can only be specified at start time:
  46.  
  47.   DOS_DEVICE=<device driver file spec>
  48.   DOS_HIGH=1                                (1 means yes)
  49.   DPMI_DOS_API=ENABLED
  50.   DPMI_MEMORY_LIMIT=8                       (integer represents megabytes)
  51.  
  52. Most settings that require ON accept either ON or 1, but some settings must
  53. have a 1 instead of ON. For help with settings strings, run SETTINGS.EXE.
  54.  
  55. To specify DOS settings to StartDos, name a REXX command file on the command
  56. line. StartDos will add .CMD if necessary. StartDos looks in the current
  57. directory for the REXX file. If not present, it searches the PATH. StartDos
  58. invokes the REXX interpreter, and the command file executes in a special
  59. StartDos environment. In this environment, the REXX program can call
  60. functions in StartDos like AddDosSetting() and StartWindowed(). Example REXX:
  61.  
  62.   /* REXX command file for StartDos (comment mandatory on first line!) */
  63.   parse arg szCommandComArgs
  64.   if 'STARTDOS' <> address()  then do
  65.     say 'Expected STARTDOS environment'
  66.     return 2
  67.   end
  68.   rc = SetSessionTitle( 'DPMI DOS Session' )
  69.   rc = AddDosSetting( 'DOS_DEVICE=C:\OS2\MDOS\ANSI.SYS' )
  70.   rc = AddDosSetting( 'DOS_HIGH=1'  )
  71.   rc = AddDosSetting( 'DPMI_DOS_API=ENABLED' )
  72.   rc = AddDosSetting( 'DPMI_MEMORY_LIMIT=8' )
  73.   /* override the default and start the session in a text window */
  74.   rc = StartWindowed()
  75.   return 0
  76.  
  77. The REXX program should return a zero result code, and StartDos will start
  78. the DOS session.
  79.  
  80. The PM version of StartDos may prove useful for starting Windows apps. The
  81. PM version is compatible with the text-mode version.
  82.  
  83. StartDos is IBM Employee Written Software. Please read the "as-is" license
  84. agreement from IBM. Essentially, you use this program "as is," and IBM
  85. makes no warranty about the correctness of this program or its suitability
  86. to any purpose.
  87.  
  88. Monte Copeland, IBM Boca Raton. monte@vnet.ibm.com
  89.  
  90.  
  91.  
  92. ----------------------- SPECIAL STARTDOS FUNCTIONS -----------------------
  93.  
  94. These special functions are available to REXX programs invoked from StartDos:
  95.  
  96.   AddDosSetting( <setting string> )    /* may be called multiple times */
  97.   ExecSynchronous()                    /* asynchronous start is default */
  98.   QueryDesktop()                       /* returns PM desktop size in pels*/
  99.   SetCommandArgs( <command.com args> ) /* args acceptable to command.com */
  100.   SetWindowPos( x, y, cx, cy )         /* set position, size of window */
  101.   SetSessionTitle( <session title> )   /* title to appear in window list */
  102.   StartBackground()                    /* start session in background */
  103.   StartForeground()                    /* foreground start is default */
  104.   StartFullscreen()                    /* fullscreen start is the default */
  105.   StartSeamless()                      /* start windows programs */
  106.   StartWindowed()                      /* start session in a text window */
  107.  
  108. AddDosSetting( <setting string> ) -- AddDosSetting may be called multiple
  109. times in order to specify all the setting strings to StartDos. Expects one
  110. string parameter.
  111.  
  112. ExecSynchronous() -- The default exec is asynchronous; i.e., StartDos will
  113. end as soon as the child DOS session is started. A synchronous exec is one
  114. where StartDos waits until the child DOS session ends before StartDos itself
  115. ends. In this case, StartDos will return the same errorlevel as COMMAND.COM.
  116. COMMAND.COM in OS/2 returns the same errorlevel as the DOS program invoked
  117. with the /c option. Therefore, a synchronous exec and /c option causes
  118. StartDos to return with the same errorlevel as the DOS program. This is
  119. important when invoking DOS programs from OS/2 batch (or make) files. Expects
  120. no parameter.
  121.  
  122. QueryDesktop() -- returns a string "xxx yyy" which is the size of the PM
  123. desktop window in pels. For example, the string "640 480" is returned
  124. for PM on VGA. This is useful to compute x, y, cx, cy for the SetWindowPos()
  125. function. There are no parameters to QueryDesktop(). Returns a zero-length
  126. string under TShell.
  127.  
  128. SetCommandArgs( <command.com args> ) -- Parameters to COMMAND.COM may be
  129. specified two different ways: on the StartDos command line after the REXX
  130. command file name, or by using SetCommandArgs() in the batch file.
  131. SetCommandArgs() always overrides arguments given on the StartDos command
  132. line. COMMAND.COM arguments given on the StartDos command line may be
  133. examined from the REXX file by using PARSE ARG.
  134.  
  135. SetSessionTitle( <session title> ) -- Sets the session title that appears in
  136. the Window List. Expects one string parameter.
  137.  
  138. SetWindowPos( x, y, cx, cy ) -- provide initial placement and size of a DOS
  139. session when a windowed session is desired. When SetWindowPos() is used,
  140. StartWindowed() is not required. Expects four numeric parameters in pels. x
  141. and y are position, cx and cy are size. See QueryDesktop(). Invalid under
  142. TShell.
  143.  
  144. StartBackground() -- Start the DOS session in background. No parameters.
  145.  
  146. StartForeground() -- Start the DOS session in the foreground. This is the
  147. default action. No parameters.
  148.  
  149. StartFullscreen() -- Start the DOS session in its own, full screen session.
  150. This is the default action. No parameters.
  151.  
  152. StartSeamless() -- When used without parameters, will start WINOS2.COM in
  153. its own seamless VDM session, and SetCommandArgs() will supply parameters
  154. to WINOS2.COM. This is compatible with the 11NOV93 version. When parameters
  155. are supplied, then they are as follows:
  156.  
  157.   1. program category
  158.  
  159.            PROG_30_STDSEAMLESSVDM                 13
  160.            PROG_30_STDSEAMLESSCOMMON              14
  161.            PROG_31_STDSEAMLESSVDM                 15
  162.            PROG_31_STDSEAMLESSCOMMON              16
  163.            PROG_31_ENHSEAMLESSVDM                 17
  164.            PROG_31_ENHSEAMLESSCOMMON              18
  165.            PROG_31_ENH                            19
  166.            PROG_31_STD                            20
  167.  
  168.   2. windows program exe name
  169.   3. startup directory
  170.  
  171. and parameters supplied with SetCommandArgs() are for the windows program exe.
  172. If you specify StartSeamless() parameters, parameter 3 is optional.
  173.  
  174. StartWindowed() -- Start the DOS session in a PM text window. Expects no
  175. parameters. Invalid under TShell.
  176.  
  177.  
  178.  
  179.  
  180. --------------------- SAM